package common.rbac.po;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Table;


@Entity
@Table(name = "sys_auth")
public class Authority extends IdEntity {

	private static final long serialVersionUID = -2831356860761027384L;
	private String authority;
	
	private Date expiredDt;

	private String name;
	private String parentId;
	private String remarks;
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Authority other = (Authority) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}
	public String getAuthority() {
		return authority;
	}

	public Date getExpiredDt() {
		return expiredDt;
	}


	public String getName() {
		return name;
	}

	public String getParentId() {
		return parentId;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}

	public void setAuthority(String authority) {
		this.authority = authority;
	}

	public void setExpiredDt(Date expiredDt) {
		this.expiredDt = expiredDt;
	}


	public void setName(String name) {
		this.name = name;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}
	public String getRemarks() {
		return remarks;
	}
	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}


}
